package com.health.tablebean;

import java.util.Date;

import android.text.TextUtils;
import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Table;

/**
 * @author Administrator 个人基本信息_家族史

 *
 */
@Table(name="ARCHIVE_FAMILYHISTORYINFO")
public class ARCHIVE_FAMILYHISTORYINFO {
	/** 母亲家族史其它 */
	private String MOTHERHISTORY_OTHER;
	/**
	 * 母亲家族史(以英文逗号分隔)1:无,2:高血压,3:糖尿病,4:冠心病,5:慢性阻塞性肺疾病,6:恶性肿瘤,7:脑卒中,8:重性精神疾病,9:
	 * 结核病,10:肝炎,11:先天畸形,12:其他
	 */
	private String MOTHERHISTORY;
	/** 父亲家族史其它 */
	private String FATHERHISTORY_OTHER;
	/**
	 * 父亲家族史(以英文逗号分隔)1:无,2:高血压,3:糖尿病,4:冠心病,5:慢性阻塞性肺疾病,6:恶性肿瘤,7:脑卒中,8:重性精神疾病,9:
	 * 结核病,10:肝炎,11:先天畸形,12:其他
	 */
	private String FATHERHISTORY;
	/** 家族成会员类型1:父亲,2:母亲,3:兄弟姐妹,4:子女 */
	private String FAMILYTYPE;
	/**
	 * 兄弟姐妹家族史(以英文逗号分隔)1:无,2:高血压,3:糖尿病,4:冠心病,5:慢性阻塞性肺疾病,6:恶性肿瘤,7:脑卒中,8:重性精神疾病,9:
	 * 结核病,10:肝炎,11:先天畸形,12:其他
	 */
	private String BROTHERSISTERHISTORY;
	/** 主键标识 */
	@Id(column="ID")	
	private String ID;
	/** 确诊时间 */
	private Date DIAGNOSETIME;
	/** 子女家族史其它 */
	private String CHILDRENHISTORY_OTHER;
	/**
	 * 子女家族史(以英文逗号分隔)1:无,2:高血压,3:糖尿病,4:冠心病,5:慢性阻塞性肺疾病,6:恶性肿瘤,7:脑卒中,8:重性精神疾病,9:
	 * 结核病,10:肝炎,11:先天畸形,12:其他
	 */
	private String CHILDRENHISTORY;
	/** 兄弟姐妹家族史其它 */
	private String BROTHERSISTERHISTORY_OTHER;
	/** 建档编号（与ARCHIVE_BASEINFO表关联） */
	private String ARCHIVEID;
	
	private String IDCARD;
	private String NGUID;
	
	
	public String getNGUID() {
		return NGUID;
	}

	public void setNGUID(String nGUID) {
		NGUID = nGUID;
	}

	public String getIDCARD() {
		return IDCARD;
	}

	public void setIDCARD(String iDCARD) {
		IDCARD = iDCARD;
	}

	public String getMOTHERHISTORY_OTHER() {
		return MOTHERHISTORY_OTHER;
	}

	public void setMOTHERHISTORY_OTHER(String mOTHERHISTORY_OTHER) {
		MOTHERHISTORY_OTHER = mOTHERHISTORY_OTHER;
	}

	public String getMOTHERHISTORY() {
		return MOTHERHISTORY;
	}

	public void setMOTHERHISTORY(String mOTHERHISTORY) {
		MOTHERHISTORY = mOTHERHISTORY;
	}

	public String getFATHERHISTORY_OTHER() {
		return FATHERHISTORY_OTHER;
	}

	public void setFATHERHISTORY_OTHER(String fATHERHISTORY_OTHER) {
		FATHERHISTORY_OTHER = fATHERHISTORY_OTHER;
	}

	public String getFATHERHISTORY() {
		return FATHERHISTORY;
	}

	public void setFATHERHISTORY(String fATHERHISTORY) {
		FATHERHISTORY = fATHERHISTORY;
	}

	public String getFAMILYTYPE() {
		return FAMILYTYPE;
	}

	public void setFAMILYTYPE(String fAMILYTYPE) {
		FAMILYTYPE = fAMILYTYPE;
	}

	public String getBROTHERSISTERHISTORY() {
		return BROTHERSISTERHISTORY;
	}

	public void setBROTHERSISTERHISTORY(String bROTHERSISTERHISTORY) {
		BROTHERSISTERHISTORY = bROTHERSISTERHISTORY;
	}

	public String getID() {
		return ID;
	}

	public void setID(String iD) {
		ID = iD;
	}

	public Date getDIAGNOSETIME() {
		return DIAGNOSETIME;
	}

	public void setDIAGNOSETIME(Date dIAGNOSETIME) {
		DIAGNOSETIME = dIAGNOSETIME;
	}

	public String getCHILDRENHISTORY_OTHER() {
		return CHILDRENHISTORY_OTHER;
	}

	public void setCHILDRENHISTORY_OTHER(String cHILDRENHISTORY_OTHER) {
		CHILDRENHISTORY_OTHER = cHILDRENHISTORY_OTHER;
	}

	public String getCHILDRENHISTORY() {
		return CHILDRENHISTORY;
	}

	public void setCHILDRENHISTORY(String cHILDRENHISTORY) {
		CHILDRENHISTORY = cHILDRENHISTORY;
	}

	public String getBROTHERSISTERHISTORY_OTHER() {
		return BROTHERSISTERHISTORY_OTHER;
	}

	public void setBROTHERSISTERHISTORY_OTHER(String bROTHERSISTERHISTORY_OTHER) {
		BROTHERSISTERHISTORY_OTHER = bROTHERSISTERHISTORY_OTHER;
	}

	public String getARCHIVEID() {
		return ARCHIVEID;
	}

	public void setARCHIVEID(String aRCHIVEID) {
		ARCHIVEID = aRCHIVEID;
	}
	
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		if (!(o instanceof ARCHIVE_FAMILYHISTORYINFO)) {
			return false;
		}
		ARCHIVE_FAMILYHISTORYINFO obj = (ARCHIVE_FAMILYHISTORYINFO) o;
		if (notNull(getARCHIVEID()).equals(notNull(obj.getARCHIVEID()))
				&& notNull(getBROTHERSISTERHISTORY()).equals(
						notNull(obj.getBROTHERSISTERHISTORY()))
				&& notNull(getBROTHERSISTERHISTORY_OTHER()).equals(
						notNull(obj.getBROTHERSISTERHISTORY_OTHER()))
				&& notNull(getCHILDRENHISTORY()).equals(notNull(obj.getCHILDRENHISTORY()))
				&& notNull(getCHILDRENHISTORY_OTHER()).equals(
						notNull(obj.getCHILDRENHISTORY_OTHER()))
				&& notNull(getDIAGNOSETIME()).equals(notNull(obj.getDIAGNOSETIME()))
				&& notNull(getFAMILYTYPE()).equals(notNull(obj.getFAMILYTYPE()))
				&& notNull(getFATHERHISTORY()).equals(notNull(obj.getFATHERHISTORY()))
				&& notNull(getFATHERHISTORY_OTHER())
						.equals(notNull(obj.getFATHERHISTORY_OTHER()))
				&& notNull(getIDCARD()).equals(notNull(obj.getIDCARD()))
				&& notNull(getMOTHERHISTORY()).equals(notNull(obj.getMOTHERHISTORY()))

				&& notNull(getMOTHERHISTORY_OTHER())
						.equals(notNull(obj.getMOTHERHISTORY_OTHER()))) {
			return true;
		}
		return false;
	}
	
	private String notNull(String str) {
		if (TextUtils.isEmpty(str)) {
			return "";
		}
		return str;
	}

	private String notNull(int str) {
		if (str == 0) {
			return "0";
		}
		return String.valueOf(str);
	}

	private Date notNull(Date date) {
		if (date == null) {
			return new Date();
		}
		return date;
	}

}
